'use strict';

const sequelize = require('./config/db');

async function checkTable() {
  try {
    const result = await sequelize.query("SHOW TABLES LIKE 'punch_plans'", { type: sequelize.QueryTypes.SELECT });
    if (result.length > 0) {
      console.log('Table punch_plans exists');
    } else {
      console.log('Table punch_plans does not exist');
    }
  } catch (error) {
    console.error('Error checking table:', error);
  } finally {
    await sequelize.close();
  }
}

checkTable();
